<?php


namespace app\admin\controller;
use think\Db;
use think\Request;
use think\Controller;
class Exedu extends ApiCommon
{
    public function ExeduWrite()
    {
        $newsModel=model('Exedu');
        $param=$this->param;
        $data=$newsModel->WriteExedu($param);
        if(!$data)
        {
            return resultArray(['error'=>'添加数据失败']);
        }
        return resultArray(['data'=>'添加数据成功']);
    }   

    public function ExeduList()
    {
        $newsModel=model('Exedu');
        $param=$this->param;
        $data=$newsModel->ListExedu($param);
        return resultArray(['data'=> $data]);
    }   
    public function ExeduRevise()
    {
        $newsModel=model('Exedu');
        $param=$this->param;
        $data=$newsModel->ReviseExedu($param);
        if(!$data)
        {
            return resultArray(['error'=>'修改数据失败']);
        }
        return resultArray(['data'=>'修改数据成功']);
    }
     public function ExeduDelete()
    {
        $newsModel=model('Exedu');
        $param=$this->param;
        $data=$newsModel->DeleteExedu($param);
        if(!$data)
        {
            return resultArray(['error'=>'删除数据失败']);
        }
        return resultArray(['data'=>'删除数据成功']);
    }
}